#include<stdio.h>
#define row 8 
#define col 8
int main()
{
	int arr[row][col];
	int i, j;
	for (i = 0; i < row; i++)
	{
		for (j = 0; j < col; j++)
		{
			if (j == 0 || i == j)
			{
				arr[i][j] = 1;
			}
			else
			{
				arr[i][j] = arr[i - 1][j - 1] + arr[i - 1][j];
			}
		}
	}
	/*for (i = 0; i < row; i++)
	{
		for (j = 0; j <=i; j++)
		{
			printf("%2d ", arr[i][j]);
		}
		printf("\n");
	}*/
	int a = row; int b = 1;
	for (i =0; i < row; i++)
	{
		b = i + 1;
		while (b <= a)
		{
			printf("  "); b++;
		}
		for (j = 0; j <=i; j++)
		{
			printf("%d   ", arr[i][j]);
		}
		printf("\n");
	}
	return 0;
}